@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --foreground-rgb: 0, 0, 0;
  --background-start-rgb: 214, 219, 220;
  --background-end-rgb: 255, 255, 255;
}

/* 主题颜色变量在ThemeContext中动态设置 */

@layer base {
  html {
    scroll-behavior: smooth;
  }
  
  body {
    color: rgb(var(--foreground-rgb));
    background: white;
  }
  
  h1, h2, h3, h4, h5, h6 {
    @apply font-semibold;
  }
  
  .section-heading {
    @apply text-3xl font-bold text-primary-600 mb-12 relative inline-block;
  }
  
  .section-heading::after {
    content: '';
    @apply absolute left-0 -bottom-3 w-full h-1 bg-primary-500 rounded-full;
  }
}

@layer components {
  .btn-primary {
    @apply inline-block px-5 py-3 bg-primary-600 text-white font-medium rounded-lg hover:bg-primary-700 transition-colors shadow-md hover:shadow-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-opacity-50;
  }
  
  .btn-secondary {
    @apply inline-block px-5 py-3 bg-white text-primary-600 border border-primary-600 font-medium rounded-lg hover:bg-primary-50 transition-colors shadow-sm hover:shadow focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-opacity-50;
  }
  
  .card {
    @apply bg-white rounded-lg shadow-md p-6 hover:shadow-lg transition-shadow;
  }
}

/* 动画 */
@keyframes pulse-light {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.2; }
}

.animate-pulse-light {
  animation: pulse-light 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin-slow {
  animation: spin 20s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 3D翻转卡片效果 */
.perspective {
  perspective: 1000px;
}

.backface-hidden {
  backface-visibility: hidden;
}

.transform-style {
  transform-style: preserve-3d;
}

.rotate-y-180 {
  transform: rotateY(180deg);
} 